package com.whw.fy.utils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ListUtil {

    /**
     * 对list的数据的的obj 进行去重
     *
     * @param list
     * @return
     */
    public static List duplicate(List list) {
        List listTemp = new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            if (!listTemp.contains(list.get(i))) {
                listTemp.add(list.get(i));
            }
        }
        Collections.sort(listTemp);
        return listTemp;
    }
}
